package com.easygem.common.model.front;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wuwenze.poi.annotation.Excel;
import com.wuwenze.poi.annotation.ExcelField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;

/**
 * @author luoxi
 * @version 1.0
 * @className Blacklist
 * @Description 黑名单
 * @date 2024/12/23 14:15
 */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("")
@Table(name = "`blacklist`")
@Excel("黑名单")
public class Blacklist {
    @Id
    @Column(name = "`blacklistId`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty("黑名单ID")
    private Integer blacklistId;

    @Column(name = "`clientName`")
    @ApiModelProperty("客户名称")
    @ExcelField(value = "客户名称", width = 150)//导出字段名
    private String clientName;

    @Column(name = "`clientPhone`")
    @ApiModelProperty("客户电话")
    @ExcelField(value = "客户电话", width = 100)
    private String clientPhone;

    @Column(name = "`userId`")
    @ApiModelProperty("创建人")
    private Long userId;

    @Column(name = "`createTime`")
    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private String createTime;//查询时，为起始时间

    @Column(name = "`remark`")
    @ApiModelProperty("备注")
    @ExcelField(value = "备注", width = 150)
    private String remark;
    // 级别字段，用整数表示不同标签类型，对应数据库中的int类型
    @Column(name = "`richClass`")
    @ApiModelProperty("级别 1:总部2:前台超管3:部门管理员4:普通用户 默认：1")
    private Integer richClass;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private transient String deadline;//截止时间
    //归属人
    @TableField(exist = false)
    @ExcelField(value = "归属人", width = 100)
    private transient String userName;
    @TableField(exist = false)
    private transient Long deptId;//部门编号
    @TableField(exist = false)
    private transient String accountName;
}
